Ext.define('DragonApp.store.JsonPMenu', {
    extend: 'Ext.data.TreeStore',

    alias: 'store.jsonpmenustore',

    requires: [
        'DragonApp.util.Msg'
    ],

    model: 'DragonApp.model.Menu',

    proxy: {

        url: DragonApp.ux.config.Config.getUrl('/index/User/getMenuTree/'),
        callbackKey: 'callback',
        type: 'jsonp',

        reader: {
            type: 'json',
            rootProperty: 'rows',
            totalProperty: 'total'
        },
        listeners: {
            exception: function(proxy, response, operation){
                DragonApp.util.Msg.showErrorMsg(response);
            }
        }
    },

    autoLoad: true
});